Field of the Invention
The present invention relates to image processing executed by an information processing apparatus such as a mobile terminal that operates as an external device for an image output apparatus, for example, a printer.
Description of the Related Art
In recent years, multi-function mobile terminals (to be referred to as mobile computers hereinafter) incorporating a camera function have explosively become widespread, and far surpass digital cameras and conventional personal computers (to be referred to as PCs hereinafter) in sales.
Such mobile computer is basically formed from three elements, that is, hardware as the computer itself, an operating system (to be referred to as an OS hereinafter) operating on the hardware, and an application operating on the OS. By using the application, the user can use a function such as a map, mail, or browsing of a Web site on the Internet.
As examples of the form of such application operating on the mobile computer, there are mainly two application forms, that is, a native application and Web application. The features of each application form will be explained below.
The native application is developed by using a development environment and development language which are prepared for each OS. For example, the C/C++ language is used on an OS provided by company A, the Java® language is used on an OS provided by company B, and a different development language is used on an OS provided by company C. In general, the native application is compiled in advance in each development environment, and converted from a so-called high-level language understandable by a human into instruction sets such as an assembler interpretable by the CPU of the computer. Thus, the ordinary native application has an advantage that it is possible to perform an operation at high speed since the CPU directly interprets instructions.
On the other hand, the Web application indicates an application operating on a Web browser which is normally incorporated in an OS on each computer in recent years. The application is generally developed by using a language such as HTML5, CSS, or JavaScript® so that the Web browser can interpret the application. These languages are Web standard languages. Therefore, if a Web application is described using the Web standard language, it can operate in any environment where the Web browser operates.
Recently, various kinds of OSs are used as the mobile computers have become widespread. Hence, an important challenge in software development is how to develop applications that operate on the OSs in a short time and offer them to users speedily.
To solve this problem, a method called cross development is used. Cross development is a method of developing most part of an application using a common program language usable across various OSs. Because of use of the common program language, this method can largely decrease the number of man-hours in development as compared to a case where applications are developed individually for the OSs, and is known as an effective application development method.
Hence, the Web application is probably a method of solving the above-described problem. However, the Web application operates on the browser and cannot therefore be distributed from application stores run by vendors as a native application. For this reason, many developers desire a cross development method in a native application style that can be distributed from the stores.
As one of cross development methods capable of store distribution, a hybrid application as described in Japanese Patent Laid-Open No. 2013-080470 has received attention. In the hybrid application, the application itself is distributed to users as the above-described native application. All or most of user interfaces (UIs) in the hybrid application are described in a so-called Web standard language such as HTML5, CSS, or JavaScript®. That is, one application includes a native layer and a script layer using a Web standard language. When such a configuration is employed, it is possible to develop software that makes use of both the advantage of the native application and that of the Web application.
However, when applying the above-described hybrid application to a print application to print a photo or document, the following problems arise.
In a normal hybrid application, a UI portion is described in a Web standard language and held in the application as text data. This text data is called a script. This script is input to an engine used by the OS to interpret and execute held scripts when the application is activated. As a result, the UI is displayed on the screen of the mobile computer so as to be operable by the user. Here, this engine is called an interpreter.
In a photo print application, for example, a print target photo is drawn on the UI. The software needs to be designed and developed so as to allow the user to superimpose date information such as a shooting date/time and a stamp such as a pictorial symbol on the photo and print the result. In the hybrid application, drawing of print content such as date information and a stamp is also described using the Web standard language.
To print the print content, the script described using the Web standard language needs to be generally converted into high-resolution image data (so-called bitmap Data®) required by the printer engine of a printer. This process is called a rendering process. When the rendering process is performed using an interpreter held by a normal OS, the following problems arise.
(1) Decrease in Process Speed
Print content described in a Web standard language is interpreted in an interpreter and converted into high-resolution image data. To transfer the high-resolution image data to a printer, the application needs to obtain converted image data from the interpreter portion of the OS, apply format conversion, and then transfer the image data to the printer. This is because the interpreter held by the OS does not have the function of converting the image data into data interpretable by the printer. For this reason, the application needs to extract the converted image data from the interpreter. The image data is normally extracted as base64 character string data. Hence, an enormous time is necessary to convert pixel values (R, G, and B) after rendering into base64 character (character string) data in the interpreter. From the user's viewpoint of the user, time necessary for rendering means a waiting time from pressing of the print button of the UI to the start of actual printing. As a result, user friendliness considerably lowers.
(2) Shortage in Memory Necessary for Rendering for Printing
A recent mobile computer incorporates a physical RAM of several GB to dramatically improve performance. Hence, high-resolution image data of several hundred MB can be held in the memory. In the normal hybrid application, the high-resolution image data is converted into base64 data by the interpreter in the OS, and the application obtains it. At this time, however, depending on the OS used, it may be impossible to ensure a memory to hold the enormous quantity of base64 data returned from the interpreter, resulting in memory shortage.
Unless the above-described two problems are solved, it is impossible to build a print application in a hybrid application effective as a cross development method. Note that the print application is merely an example, and the same problems as described above arise when sending data from a target computer to an external device after format conversion.